//
//  ChatTableViewCell.m
//  FKGW
//
//  Created by song ce on 2017/3/28.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "ChatTableViewCell.h"
#import "UIView+Extend.h"
@implementation ChatTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = [UIColor clearColor];
    self.contentView.backgroundColor = [UIColor clearColor];
    // Initialization code
}

-(void)setModel:(ChatModel *)model{
    _model = model;
    self.contentLabel.text= _model.content;
    
    CGRect frame = [_model.content boundingRectWithSize:CGSizeMake(self.frame.size.width, 1000) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil];
    CGFloat height = CGRectGetHeight(frame);

    [self.contentLabel setHeight:height];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
